<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" />
    <title>沃闪购</title>
    <link rel="icon" href="./img/bitbug_favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/normalize.css" />
    <!--<link rel="stylesheet" href="index.css"/>-->
    <!--<link rel="stylesheet" href="index.css"/>-->
    <link rel="stylesheet" href="./index_format.css" />
    <script type="text/javascript" src="./js/tool.js"></script>
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script type="text/javascript" src="./js/rem.js"></script>
</head>

<body>
    <div class="header">
        <div>
            <img src="./img/wo-logo.png" alt="" />
        </div>
        <div class="wo-topic">沃闪购合作营销平台</div>
    </div>
    <div class="container">
        <div class="flex-box">
            <div class="flex-info">
                <p>
                    <!--<a href="./template/login.html"> <b id="grcode"></b></a>-->
                    <b id="grcode"></b>
                </p>
                <p>长按二维码进入<br/><br/>沃闪购企业员工注册页面</p>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="./js/qrcode.min.js"></script>
    <script>
        $.fn.longPress = function(fn) {
            var timeout = undefined;
            var $this = this;
            for (var i = 0; i < $this.length; i++) {
                $this[i].addEventListener('touchstart', function(event) {
                    timeout = setTimeout(fn, 800);
                }, false);
                $this[i].addEventListener('touchend', function(event) {
                    clearTimeout(timeout);
                }, false);
            }
        }
        var indexPage = {
            code_enter: '#code_enter',
            url: '/template/login.html',
            //        url: 'http://www.baidu.com',
            init: function() {
                this.enterPage();
            },
            enterPage: function() {
                var context = this;
                //            location.href = context.url;
                //            $(context.code_enter).longPress(function () {
                //                location.href = context.url;
                //            });
                //            $(context.code_enter).click(function (e) {
                //                e.preventDefault();
                //                location.href = context.url;
                //            })
                var qrcode = new QRCode(document.getElementById("grcode"), {
                    width: 140,
                    height: 140,
                    text: getServerHost() + context.url
                });
            }
        };
        indexPage.init();
        //    var url = './template/tem_channel.html';

        //    ./template/tem_channel.html
    </script>
</body>

</html>
